package com.niit.session11;

public class Cleanner extends Employee{
	private String name;
	
	public void cleaning() {
		String name = "";
//		如果有同名变量，引用的规则是就近原则，谁近原则
		System.out.println(name);
//		如果想引用本类的成员变量，用this
		System.out.println(this.name);
//		应用父类的变量，用super
//		System.out.println(super.name);
	}
	
	
	public Cleanner() {
//		super()用于调用父类的构造方法
//		super();
	}
//通过父类创建构造方法
//	快捷键：alt+shift+s 选generate constructor from superclass
	public Cleanner(String name, String gender, int age, double money) {
		super(name, gender, age, money);
	}

}
